package bsc.war.ajax;

import bsc.war.delegate.DelegateBSC;
import bsc.war.factory.Factory;
import bsc.war.handler.DashboardScoreCard;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

/**
 *
 * @author Miguel Angel
 */
public class AjaxDashboardScoreCardScore extends AbstractController {

    public AjaxDashboardScoreCardScore() {
    }

    @Override
    protected ModelAndView handleRequestInternal(
            HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        try {
            DelegateBSC delegate = (DelegateBSC) Factory.getBean("DelegateBSC");

            DashboardScoreCard.processRequestInternal(request, response, delegate);

        } catch (Exception e) {
            logger.error("Catched exception",e);
        }
        return new ModelAndView("ajaxDashboardScoreCardScore");
    }

}
